<include file="application/walletyhbbadmin/view/public/left.html"/>
   
 <div id="dcMain">
   <!-- 当前位置 -->
<div id="urHere">管理中心<b>></b><strong>模板管理</strong> </div>   <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
     <h3><a href="{:U('Muban/addMuban')}" class="actionBtn add">添加模板</a>模板管理</h3>
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
    <tr align="center">
        <th>ID</th>
        <th>模板名称</th>
        <th>模板图片</th>
        <th>上传时间</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    <volist name='muban' id='vo'>
    <tr align="center">
        <td>{$vo.id}</td>
        <td>{$vo.name}</td>
        <td><img src="{$vo.pic}" width="300px" height="200px"></td>
        <td>{$vo.add_time|date="Y-m-d H:i:s",###}</td>
        <td>
            <eq name="vo.status" value="1">使用
                <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('Muban/updateStatus',array('id'=>$vo.id))}" style="color:#fff">关闭</a>&nbsp;</span>
            </eq>
            <eq name="vo.status" value="0">关闭
                <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('Muban/updateStatus',array('id'=>$vo.id))}" style="color:#fff">使用</a>&nbsp;</span>
            </eq>
        </td>
        <td><a href="JavaScript:void(0);" class="del" did="{$vo.id}">删除</a>&nbsp;&nbsp;<a href="/walletyhbbadmin/muban/edit/id/{$vo.id}">修改</a></td>
        </tr>
    </volist>
    </table>
    <div>{$page}</div>
</div>
</div>
<div class="clear"></div>
<include file="application/walletyhbbadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div> </div>
</body>
<script type="text/javascript">

    $('.del').click(function(){
        var msg = "您确定要删除吗？";
        if (confirm(msg)==true) {
            var id = $(this).attr('did');
            $.post('/walletyhbbadmin/Muban/delMuban', {'id': id}, function (data) {
                layer.msg(data.info);
                if (data.status > 0) {
                    setTimeout(function () {
                        window.location.reload();
                        isclick4 = true;
                    }, 1000);
                }
            });
        }
    });
</script>
</html>